//
//  RootViewController.m
//  GaoBiaoB
//
//  Created by lanou3g on 16/1/15.
//  Copyright © 2016年 lanou3g. All rights reserved.
//

#import "RootViewController.h"
#import "HomePageTableViewController.h"
#import "NearTableViewController.h"
#import "SelectViewController.h"
#import "MyViewController.h"
@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor yellowColor];
    HomePageTableViewController *homePage = [[HomePageTableViewController alloc]initWithStyle:UITableViewStyleGrouped];
    homePage.tabBarItem.title = @"主页";
    homePage.tabBarItem.image = [UIImage imageNamed:@"iconfont-zhuye"];
    UINavigationController *homePageNV = [[UINavigationController alloc]initWithRootViewController:homePage];
    NearTableViewController *near = [[NearTableViewController alloc]initWithStyle:UITableViewStyleGrouped];
    near.tabBarItem.title = @"附近";
    near.tabBarItem.image = [UIImage imageNamed:@"iconfont-fujin"];
    
    SelectViewController *selectVC = [[SelectViewController alloc]init];
    UINavigationController *rootSelect = [[UINavigationController alloc]initWithRootViewController:selectVC];
    selectVC.title= @"精选";
    selectVC.tabBarItem.title = @"精选";
    selectVC.tabBarItem.image = [UIImage imageNamed:@"iconfont-jingxuan"];
    MyViewController *my = [[MyViewController alloc]init];
    UINavigationController *rootMy = [[UINavigationController alloc]initWithRootViewController:my];
    my.title = @"我的";
    my.tabBarItem.title  = @"我的";
    my.tabBarItem.image = [UIImage imageNamed:@"iconfont-wode"];
    
    self.viewControllers = @[homePageNV,near,rootSelect,rootMy];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
